package com.foreverwin.mes.common.dto;

import com.foreverwin.mes.common.model.PrintRequest;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Ervin Chen
 * @date 2020/3/6 13:26
 */
public class PrintDto {

    private PrintRequest printRequest;
    private String isReprint;

    public PrintRequest getPrintRequest() {
        return printRequest;
    }

    public void setPrintRequest(PrintRequest printRequest) {
        this.printRequest = printRequest;
    }

    public String getIsReprint() {
        return isReprint;
    }

    public void setIsReprint(String isReprint) {
        this.isReprint = isReprint;
    }

    public static void main(String[] args){
        PrintRequest<Map<String,Object>> printRequest = new PrintRequest<>();
        Map<String,Object> printMap = new HashMap<>();
        printMap.put( "ITEM", "123" );
        printMap.put( "ITEM_DESC", "123" );
        printMap.put( "CONTAINER_NO", "123" );
        printMap.put( "PACK_QTY", "123" );
        printMap.put( "PRINT_DATE", "123" );
        printMap.put( "SHIFT", "123" );

        printRequest.setPrinter("XPS");
        printRequest.setLabelQty(1);
        printRequest.setTemplate("doc");
        printRequest.addPrintData(printMap);

        PrintDto printDto = new PrintDto();
        printDto.setPrintRequest(printRequest);
        PrintRequest printRequest1 = printDto.getPrintRequest();
        System.out.println(printRequest);
    }
}
